package com.yvan.demo.controller;

import com.yvan.PageDb;
import com.yvan.demo.entity.BasSku;
import com.yvan.demo.service.BasSkuService;
import com.yvan.mvc.Model;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class BasSkuController {

    @Autowired
    private BasSkuService basSkuService;

    @GetMapping("/sku/query")
    public Model<List<BasSku>> selectAll(PageDb pageDb) {
        List<BasSku> list = basSkuService.selectAll(pageDb);
        return Model.newSuccess(pageDb, list);
    }

}
